Skip to content

Conversation

@adombeck
Copy link
Contributor

@adombeck adombeck commented Jan 23, 2026

Second attempt to merge the previously independent authd-oidc-brokers repo as a subdirectory into the authd repo.

The main motivation is that it allows the e2e-tests to test changes to the authd repo and the brokers repo at the same time.

The previous attempt was #1203 which rewrote the git history to make all file changes be on a subdirectory authd-oidc-brokers/. We decided to redo it without rewriting the git histroy, so that the commit IDs stay the same and we can more easily find the original PR which added the commit in the authd-oidc-brokers repo.

UDENG-8815

denisonbarbosa and others added 30 commits November 13, 2025 11:53
Create a symlink e2e-tests/resources/broker which points to the broker
implementation that's used by the tests and is updated by
run_tests.sh.

It's not perfect because code navigation will always navigate to the
broker implementation which was last used in tests, but it's way better
than no code navigation at all.
The spelling where the keyword is written in one word breaks code
navigation in my IDE.
Using ${CURDIR} breaks code navigation in my IDE
The latter seems to be supported by robot framework but not by IDE.
It's hard to debug failures without the command output.
I encountered the issue that the port 5900 was already in use by another
VM which caused the tests to fail.

Let libvirt assign a free VNC port instead and tell YARF to use that
port.
Arguments can now be passed to yarf after a `--`.

Note that yarf itself passes arguments to robot (the robot framework
executable) after a `--`, so we can now pass arguments to robot after
two `--`, for example:

    e2e-tests/run_tests.sh -- -- --loglevel DEBUG
* Avoids reusing the same run dir each time, allowing to look at the
  results of previous runs
* More easily discoverable since it's in the repo (but ignored in
  .gitignore to avoid untracked files).
... and a e2e-tests/vm/ssh.sh script to connect to the VM via SSH.

The provisioning script does all the steps necessary before running the
tests, including installation and configuration of authd and the brokers
and creation of snapshots.

We now use public key authentication when connecting to the VM via SSH,
so the provisioning script requires an SSH public key as argument.

Using public key authentication allows us to avoid using sshpass and is
more secure, because it avoids that other libvirt VMs using the default
network can access the e2e-runner.
We're using pipes in the script, and in general it's good practice to
always set pipefail in bash scripts.
The script automates the setup of YARF for the end-to-end tests. It
stores yarf in a gitignored directory which is automatically used by
the run_test.sh script.
More descriptive variable name
Allows to debug the browser login via the webview. Replaces the
functionality of the RUN_ONSCREEN environment variable.
We were frequently seeing errors like the password being pasted into the
username field. Lets try to make this more robust by not only waiting
for the page to stop loading but also for specific text to be visible.
So running the browser in any setup works with the the website defaults
without making them translate
adombeck and others added 22 commits January 19, 2026 13:52
When trying to log in as a user which doesn't have a local password yet
and the broker fails to connect to the provider, we showed this error:

    could not get authentication modes: no authentication modes available for user "[email protected]"

That's not very helpful, as it doesn't tell the user why there are no
authentication modes available. This commit shows the error message:

    Error connecting to provider. Check your network connection.

UDENG-8817
The "headings" in this list used inconsistent capitalization. They
should use sentence case.
In preparation for merging the authd-oidc-brokers repo into the authd
repo.
We already have these in the root directory of the monorepo.
We want to do word splitting on flags
Fixes the libhimmelblau build to fail with:

    current package believes it's in a workspace when it's not
* Remove surrounding $() to avoid executing output (or use eval if intentional). [SC2091]
* Double quote array expansions to avoid re-splitting elements. [SC2068]
Same as for the qa workflow, see 768fd5a
Two reasons:
* I couldn't get the version script to work when the snap/ directory was
  not in the git root directory, because it doesn't find the .git
  directory.
* The Launchpad snap package requires a git branch which contains a top
  level snap/snapcraft.yaml.
It can happen that the version part is built twice:

    execute action version:Action(part_name='version', step=Step.BUILD, action_type=ActionType.RUN, reason=None, project_vars=ProjectVarInfo(root={}), properties=ActionProperties(changed_files=None, changed_dirs=None))
    [...]
    execute action version:Action(part_name='version', step=Step.BUILD, action_type=ActionType.UPDATE, reason="'PULL' step changed", project_vars=ProjectVarInfo(root={}), properties=ActionProperties(changed_files=[], changed_dirs=['.git', 'snap']))

Both try to set the version, resulting in:

    RuntimeError: 'override-build' in part 'version' executed an invalid control API call: variable 'version' can be set only once.

This commit only sets the version if it wasn't set before.
Rename

    github.com/ubuntu/authd-oidc-brokers

to

    github.com/canonical/authd/authd-oidc-brokers
We're merging the github.com/ubuntu/authd-oidc-brokers repo into the
github.com/canonical/authd repo, so replace the links accordingly.

Also, since "website" and "source-code" would point to the same URL,
make "website" point to the documentation instead.
To make it more obvious that it do not contain the broker QA jobs.
@adombeck adombeck marked this pull request as ready for review January 23, 2026 14:10
@adombeck adombeck closed this Jan 23, 2026
@adombeck adombeck reopened this Jan 23, 2026
@github-actions
Copy link

✅dependabot config looks good 👍

@codecov
Copy link

codecov bot commented Jan 23, 2026

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@didrocks didrocks merged commit 00ffc77 into main Jan 23, 2026
26 of 30 checks passed
@didrocks didrocks deleted the merge-authd-oidc-brokers-repo branch January 23, 2026 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants